/*
Project : Programmable Control of Airflow System for Maintaining Oxygen Saturation in Pre-term Infants
Microcontroller : STM32F4 Discovery (STM32F407VG)
File : Oxygen_Pulse_Meter.h

Deverloper : Phattaradanai Kiratiwudhikul
Deverloped by Department of Electrical Engineering, Faculty of Engineering, Mahidol University
*/
// -----------------------------------------------------------------------------
#include "main.h"
#include <stdlib.h>

//------------------------------------------------------------------------------
#ifndef __OXYGEN_PULSE_METER
#define __OXYGEN_PULSE_METER
// Define ----------------------------------------------------------------------
#define SIZE_OF_OPM_BUFFER    	174
#define SIZE_DATE_TIME_BUFFER		17

typedef struct
{
  char cDateTime [SIZE_DATE_TIME_BUFFER];
  uint8_t uiCurrent_SpO2;
  bool bReadCorrect;
}SDecode_data_OPM;


// Function --------------------------------------------------------------------
void oxygen_pulse_meter_driver_setup(void);
SDecode_data_OPM Get_OxygenSat(char cData_from_OPM[]);
void clear_OPM_buffer(char cData_clear[]);
//------------------------------------------------------------------------------
#endif
/*--------------------------------------------------------------------------------------------------
(C) Copyright 2014, Department of Electrical Engineering, Faculty of Engineering, Mahidol University
--------------------------------------------------------------------------------------------------*/
